package com.frogs.ucenter.dao.ibatis;

import com.frogs.framework.base.dao.ibatis.BaseDaoIbatis;
import com.frogs.ucenter.dao.UserRechargeStrategyDao;
import com.frogs.ucenter.entity.UserRechargeStrategy;
import com.ibatis.sqlmap.client.SqlMapClient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Repository;

@Repository("userRechargeStrategyDao")
public class UserRechargeStrategyDaoImpl extends BaseDaoIbatis<UserRechargeStrategy> implements UserRechargeStrategyDao {

    public UserRechargeStrategyDaoImpl() {
        super();
        setNameSpace( "user_recharge_strategy" );
    }

    @Required
    @Autowired
    public void setSqlMapClientAutowired(SqlMapClient sqlMapClient) {
        super.setSqlMapClient( sqlMapClient );
    }

	@Override
	public void insertById(Integer id) throws Exception {
		SqlMapClient sqlMapClient = getSqlMapClientTemplate().getSqlMapClient();
		sqlMapClient.insert(getNameSpace() + ".insertLog", id);
	}
}